﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetAreasBySucursalID')
	BEGIN
		DROP  Procedure  GetAreasBySucursalID
	END

GO

CREATE Procedure GetAreasBySucursalID

	(
		@idSucursal int
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT
	[Descripcion],
	[IdArea],
	[IdAreaSuperior],
	[IdSucursal],
	[Nombre]
	FROM [Area] 
	WHERE [IdSucursal] = @idSucursal

	SET NOCOUNT OFF
END

GO


GRANT EXEC ON GetAreasBySucursalID TO PUBLIC

GO


